"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=e(require("compute-scroll-into-view"));let o=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};module.exports=function(e,l){let n=e.isConnected||e.ownerDocument.documentElement.contains(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(l))return l.behavior(n?t.default(e,l):[]);if(!n)return;let r=o(l),c=t.default(e,r),i="scrollBehavior"in document.body.style;c.forEach((e=>{let{el:t,top:o,left:l}=e;t.scroll&&i?t.scroll({top:o,left:l,behavior:r.behavior}):(t.scrollTop=o,t.scrollLeft=l)}))};
//# sourceMappingURL=index.cjs.map
